<?php

namespace App\Vilidate\playlet;

/**
 * user控制器下的验证规则类
 */
class RechargeTemplateController
{
    public $index = ['rule'=>[], 'msg'=>[]];

    public $view = ['rule'=>[], 'msg'=>[]];

    public $delete = ['rule'=>[], 'msg'=>[]];

    public $create = [
        'rule'=>[
            'name' => 'required',
            'convention' => 'required|array',
            'company_id' => 'required|integer',
            'applet_id' => 'required|integer',
            'member' => 'required|array',
            'promotion' => 'required|array',
            'status' => 'required',
            'sortInfo' => 'required|array',
        ],
        'msg'=>[
            'name.required' => '名称不能为空',
            'convention.required' => '常规档位不能为空',
            'convention.array' => '常规档位应该为数组',
            'member.required' => '会员档位不能为空',
            'member.array' => '会员档位应该为数组',
            'promotion.required' => '促销档位不能为空',
            'promotion.array' => '促销档位应该为数组',
            'sortInfo.required' => '排序数组不能为空',
            'sortInfo.array' => '排序数组应该为数组',
            'status.required' => '状态不能为空',
            'applet_id.required' => '小程序不能为空',
            'company_id.required' => '公司不能为空',
            'company_id.integer' => '公司ID应为整数',
            'applet_id.integer' => '小程序ID应为整数',
        ]
    ];

    public $update = [
        'rule'=>[
            'name' => 'required',
            'company_id' => 'required|integer',
            'applet_id' => 'required|integer',
            'convention' => 'required|array',
            'member' => 'required|array',
            'promotion' => 'required|array',
            'status' => 'required',
            'sortInfo' => 'required|array',
        ],
        'msg'=>[
            'name.required' => '名称不能为空',
            'convention.required' => '常规档位不能为空',
            'convention.array' => '常规档位应该为数组',
            'member.required' => '会员档位不能为空',
            'member.array' => '会员档位应该为数组',
            'promotion.required' => '促销档位不能为空',
            'promotion.array' => '促销档位应该为数组',
            'sortInfo.required' => '排序数组不能为空',
            'sortInfo.array' => '排序数组应该为数组',
            'status.required' => '状态不能为空',
            'applet_id.required' => '小程序不能为空',
            'company_id.required' => '公司不能为空',
            'company_id.integer' => '公司ID应为整数',
            'applet_id.integer' => '小程序ID应为整数',
        ]
    ];
}